import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    allNav: [],
  },
  allArr:[],
  mutations: {
    allNav(state, arr) {
      state.allNav = arr;
    },
    deleteItem(state,index){
      state.allNav.splice(index, 1)
      state.allArr.push(state.allArr[index])
    
    },
    addItem(state,index){
      state.allArr.push(state.allArr[index])
      state.allNav.splice(index,1)
    
    }
  },
  actions: {},
  modules: {},
});
